package com.im.user.controller;

import com.im.common.Result;
import com.im.user.client.SsoClient;
import com.im.user.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Created leijun
 * @Date 2021/11/18 10:02 下午
 */
@RequestMapping("user")
@RestController
public class UserController {

    @Autowired
    private SsoClient ssoClient;

    /**
     * 登陆
     * @param username
     * @param password
     * @return
     */
    @PostMapping("login")
    public Result<String> login(String username, String password) {
        return ssoClient.login(username, password);
    }

    /**
     * 用户注册
     * @param user
     * @return
     */
    public Result regist(User user) {

        return null;
    }
}
